﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/SiteManage.Master" AutoEventWireup="true" CodeBehind="KhachHang.aspx.cs" Inherits="NXBSaiGon.Admin.KhachHang" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:NXBSaiGonConnectionString1 %>" 
        DeleteCommand="DELETE FROM [KhachHang] WHERE [MaKhachHang] = @MaKhachHang" 
        InsertCommand="INSERT INTO [KhachHang] ([TenKhachHang], [DiaChi], [DienThoai], [Email], [CMND], [Username], [Password]) VALUES (@TenKhachHang, @DiaChi, @DienThoai, @Email, @CMND, @Username, @Password)" 
        ProviderName="<%$ ConnectionStrings:NXBSaiGonConnectionString1.ProviderName %>" 
        SelectCommand="SELECT [MaKhachHang], [TenKhachHang], [DiaChi], [DienThoai], [Email], [CMND], [Username], [Password] FROM [KhachHang] WHERE MaKhachHang = @MaKhachHang" 
        UpdateCommand="UPDATE [KhachHang] SET [TenKhachHang] = @TenKhachHang, [DiaChi] = @DiaChi, [DienThoai] = @DienThoai, [Email] = @Email, [CMND] = @CMND, [Username] = @Username, [Password] = @Password WHERE [MaKhachHang] = @MaKhachHang">
        <SelectParameters>
            <asp:QueryStringParameter QueryStringField="MaKhachHang" Name="MaKhachHang" Type="Int32" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="MaKhachHang" Type="Int32" />
        </DeleteParameters>
        <InsertParameters>
            <asp:Parameter Name="TenKhachHang" Type="String" />
            <asp:Parameter Name="DiaChi" Type="String" />
            <asp:Parameter Name="DienThoai" Type="String" />
            <asp:Parameter Name="Email" Type="String" />
            <asp:Parameter Name="CMND" Type="String" />
            <asp:Parameter Name="Username" Type="String" />
            <asp:Parameter Name="Password" Type="String" />
        </InsertParameters>
        <UpdateParameters>
            <asp:Parameter Name="TenKhachHang" Type="String" />
            <asp:Parameter Name="DiaChi" Type="String" />
            <asp:Parameter Name="DienThoai" Type="String" />
            <asp:Parameter Name="Email" Type="String" />
            <asp:Parameter Name="CMND" Type="String" />
            <asp:Parameter Name="Username" Type="String" />
            <asp:Parameter Name="Password" Type="String" />
            <asp:Parameter Name="MaKhachHang" Type="Int32" />
        </UpdateParameters>
    </asp:SqlDataSource>

    <div style="text-align:center">
    <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
        CellPadding="4" DataKeyNames="MaKhachHang" DataSourceID="SqlDataSource1" 
        ForeColor="#333333" GridLines="None" Height="50px" Width="219px">
        <AlternatingRowStyle BackColor="White" />
        <CommandRowStyle BackColor="#C5BBAF" Font-Bold="True" />
        <EditRowStyle BackColor="#7C6F57" />
        <FieldHeaderStyle BackColor="#D0D0D0" Font-Bold="True" />
        <Fields>
            
            <asp:BoundField DataField="TenKhachHang" HeaderText="TenKhachHang" 
                SortExpression="TenKhachHang" />
            <asp:BoundField DataField="DiaChi" HeaderText="DiaChi" 
                SortExpression="DiaChi" />
            <asp:BoundField DataField="DienThoai" HeaderText="DienThoai" 
                SortExpression="DienThoai" />
            <asp:BoundField DataField="Email" HeaderText="Email" SortExpression="Email" />
            <asp:BoundField DataField="CMND" HeaderText="CMND" SortExpression="CMND" />
            <asp:BoundField DataField="Username" HeaderText="Username" 
                SortExpression="Username" />
            <asp:BoundField DataField="Password" HeaderText="Password" 
                SortExpression="Password" />
            <asp:CommandField ShowDeleteButton="True" ShowEditButton="True" 
                ShowInsertButton="True" />
        </Fields>
        <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#E3EAEB" />
    </asp:DetailsView>
    </div>
</asp:Content>
